﻿using System;
using System.Collections.Generic;
using System.Data.Common;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace XB.Core.DAO
{
    public class SqlServerClient : SqlClient
    {
        public SqlServerClient(string connectionString, int timeOutInSecond = 10) : base(connectionString, timeOutInSecond)
        {
        }

        protected override DbCommand GetCommand(string sql, DbConnection conn)
        {
            return new SqlCommand(sql, (SqlConnection)conn);
        }

        protected override DbConnection GetConnection()
        {
            return new SqlConnection(_connectionString);
        }
    }
}
